#ifndef ARTICLE_H
#define ARTICLE_H

#include <QObject>
#include <QString>
#include <QStringList>

class Article : public QObject
{
    Q_OBJECT
public:
    explicit Article(    int _sid,
                         int64_t _lid,
                         QString _title,
                         QString _desc,
                         double _thumbnailAspectRatio,
                         int _posttime,
                         QString _linkImage,
                         QString _linkSmallThumbnail,
                         int _cid,
                         QString _url,
                         QObject *parent = 0);

    inline int sid() const {
        return m_sid;
    }

    inline int64_t getId() const {
        return m_lid;
    }

    inline QString title() const {
        return m_title;
    }

    inline QString desc() const {
        return m_desc;
    }

    inline double thumbnailAspectRatio() const {
        return m_thumbnailAspectRatio;
    }

    inline int posttime() const {
        return m_posttime;
    }

    inline QString linkImage() const {
        return m_linkImage;
    }

    inline QString linkSmallThumbnail() const {
        return m_linkSmallThumbnail;
    }

    inline int cid() const {
        return m_cid;
    }

    inline QString url() const {
        return m_url;
    }

    inline QStringList listLinkImage() const {
        return m_listLinkImage;
    }

    inline QString content() const {
        return m_content;
    }

    inline bool isHasContent() const {
        return m_isHasContent;
    }

    void setListLinkImage(QStringList _listLinkImage) {
        m_listLinkImage = _listLinkImage;
    }

    void setContent(QString _content) {
        m_content = _content;
    }

    void setIsHasContent(bool _isHasContent) {
        m_isHasContent = _isHasContent;
    }

private:
    int m_sid;
    int64_t m_lid;   // id article
    QString m_title;
    QString m_desc;
    double m_thumbnailAspectRatio;
    int m_posttime;
    QString m_linkImage;
    QString m_linkSmallThumbnail;
    int m_cid;
    QString m_url;
    QStringList m_listLinkImage;
    QString m_content;
    bool m_isHasContent;

};

#endif // ARTICLE_H
